﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DARE
{

    public interface IIndexedObject
    {
        int Index { get; set; }
    }

    public interface IPathNode : IIndexedObject
    {
        int X { get; }
        int Y { get; }
        bool IsWalkable { get; }
    }

    public class CWay
    {
        public int sX;
        public int sY;
        public int eX;
        public int eY;

        public CWay()
        {
            sX = 0;
            sY = 0;
            eX = 0;
            eY = 0;
        }

        public CWay(int startX, int startY, int endX, int endY)
        {
            sX = startX;
            sY = startY;
            eX = endX;
            eY = endY;
        }
    }

    public interface IPathSearch
    {
        void SetMap(int[,] map);
        void SetMap(IPathNode[,] map);
        void Search(Object way);

        IPathNode[,] SearchSpace { get; }
        int Width { get; }
        int Height { get; }
        LinkedList<IPathNode> Path { get; }
        bool AllowDiagonalMove { get; set; }

        event EventHandler eSearchComplete;
        event EventHandler eSearchFailed;
    }

}
